import 'dart:ffi';
import 'package:flutter/services.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:rtk_ota_plugin/rtk_ota_plugin.dart';
import 'rtk_ota_plugin_method_channel.dart';

abstract class RtkOtaPluginPlatform extends PlatformInterface {
  RtkOtaPluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static RtkOtaPluginPlatform _instance = MethodChannelRtkOtaPlugin();

  static RtkOtaPluginPlatform get instance => _instance;

  static set instance(RtkOtaPluginPlatform instance) {
    PlatformInterface.verifyToken(instance,_token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  void initDfuAdapter(String address,String path) {
    throw UnimplementedError('initDfuAdapter() has not been implemented.');
  }

  void initIosDfuAdapter(String name,String path) {
    throw UnimplementedError('initIosDfuAdapter() has not been implemented.');
  }

  Future<Void> setAddress(String address) {
    throw UnimplementedError('setAddress() has not been implemented.');
  }

  void setFilePath(String path) {
    throw UnimplementedError('setFilePath() has not been implemented.');
  }

  Future<String> getColorPath() {
    throw UnimplementedError('getColorPath() has not been implemented.');
  }

  Future<String> getFirmwarePath() {
    throw UnimplementedError('getFirmwarePath() has not been implemented.');
  }

  Future<String> connectRemoteDevice(String address) {
    throw UnimplementedError('getDataPath() has not been implemented.');
  }

  void otaListener(Future<dynamic> Function(MethodCall call)? handler){
    throw UnimplementedError('getDataPath() has not been implemented.');
  }
  void otaListenerMessage(RtkOtaPluginCallBack callBack){
    throw UnimplementedError('otaListenerMessage() has not been implemented.');
  }
  void disMessage(){
    throw UnimplementedError('disMessage() has not been implemented.');
  }
  Future<String> md5(String path){
    throw UnimplementedError('md5() has not been implemented.');
  }




}
